<!--
 * @Author: your name
 * @Date: 2019-11-07 19:19:56
 * @LastEditTime: 2019-11-07 19:23:04
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \1107作业\1107demo.html
 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var a = [1, 2, 3];
        var len = a.length;
        for (let i = 0; i < len; i++) {
            setTimeout(() => {
                console.log(a[i]);
            });
        }
    </script>
</body>

</html>